﻿using System.Windows.Controls;

namespace KinonekoSoftware.Studio.Pages.Galleries.Geography
{

    [Associate(View = typeof(GeographyGalleryView), ViewModel = typeof(GeographyGalleryViewModel))]
    [Associate(View = typeof(GeographyGalleryView), ViewModel = typeof(TreeGalleryViewModel))]
    public partial class GeographyGalleryView
    {
        public GeographyGalleryView()
        {
            InitializeComponent();
        }
        
        
        protected override void OnViewModelMessaging(object parameter)
        {
            var vm = ViewModel<GeographyGalleryViewModel>();

            if (parameter is null && vm is not null)
            {
                OpenButton.IsEnabled = vm.CurrentSelected is not null;
            }
        }
    }
}